import { cateArtList } from '@/api/art'
export default {
  state: {
    artList: []
  },
  mutations: {
    setList (state, list) {
      state.artList = list
    }
  },
  actions: {
    async  getArtList ({ commit }) {
      const { data } = await cateArtList()
      if (data.code === 0) {
        commit('setList', data.data)
      } else {
        this.$message.error(data.message)
      }
    }
  },
  getters: {},
  namespaced: true
}
